home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume89 / editors / stevie36.1 next >
Internet Message Format  |  1989-05-12  |  35KB

  1. Path: xanth!ukma!rex!ames!oliveb!sun!swap!page
  2. From: page%swap@Sun.COM (Bob Page)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v89i130:  stevie - vi editor clone v3.6, Part01/06
  5. Message-ID: <104417@sun.Eng.Sun.COM>
  6. Date: 12 May 89 03:05:01 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 1437
  9. Approved: page@sun.com
  10.  
  11. Submitted-by: grwalter@watmath.waterloo.edu (Fred Walter)
  12. Posting-number: Volume 89, Issue 130
  13. Archive-name: editors/stevie36.1
  14.  
  15. Differences between this version and 3.35A:
  16.     - much faster screen I/O
  17.     - will no longer lock-up until the window is resized
  18.     - a lot more out-of-memory checking
  19.     - miscellaneous bug fixes.
  20.  
  21. Stevie requires a fair amount of memory to use.  As always, it can
  22. be made resident.
  23.  
  24. # This is a shell archive.
  25. # Remove anything above and including the cut line.
  26. # Then run the rest of the file through 'sh'.
  27. # Unpacked files will be owned by you and have default permissions.
  28. #----cut here-----cut here-----cut here-----cut here----#
  29. #!/bin/sh
  30. # shar: SHell ARchive
  31. # Run the following text through 'sh' to create:
  32. #    MAKE_TAGS
  33. #    Makefile
  34. #    README
  35. #    TODO
  36. #    alloc.c
  37. #    amiga.c
  38. #    amiga.h
  39. #    ascii.h
  40. #    bsd.c
  41. #    bsd.h
  42. #    charset.c
  43. # This is archive 1 of a 6-part kit.
  44. # This archive created: Thu May 11 19:41:24 1989
  45. echo "extracting MAKE_TAGS"
  46. sed 's/^X//' << \SHAR_EOF > MAKE_TAGS
  47. X/ctags/ctags -t    alloc.c charset.c cmdline.c dec.c edit.c
  48. X/ctags/ctags -t -a fileio.c help.c inc.c linefunc.c main.c mark.c
  49. X/ctags/ctags -t -a misccmds.c normal.c param.c screen.c
  50. X/ctags/ctags -t -a search.c format_l.c
  51. X/ctags/ctags -t -a s_io.c ascii.h keymap.h
  52. X/ctags/ctags -t -a macros.h param.h stevie.h term.h mk.c
  53. X
  54. X/ctags/ctags -t -a amiga.h amiga.c
  55. SHAR_EOF
  56. echo "extracting Makefile"
  57. sed 's/^X//' << \SHAR_EOF > Makefile
  58. X#
  59. X# Makefile for Lattice C 5.0 on Amiga
  60. X#
  61. X
  62. X.c.o:
  63. X    lc $(CFLAGS) $<
  64. X
  65. X#CFLAGS = -cu -ma -DAMIGA
  66. XCFLAGS = -cu -ma -O -DAMIGA
  67. XLINKFLAGS = NODEBUG
  68. XLIBS = lib:lc.lib
  69. X
  70. XMACH=    amiga.o
  71. X
  72. XOBJ1=    main.o edit.o linefunc.o normal.o cmdline.o charset.o
  73. XOBJ2=    format_l.o misccmds.o help.o dec.o inc.o search.o alloc.o
  74. XOBJ3=    mk.o regexp.o regsub.o version.o
  75. XOBJ4=    s_io.o mark.o screen.o fileio.o param.o
  76. X
  77. XOBJ= $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(MACH)
  78. X
  79. Xall: stevie
  80. X    say "done all"
  81. X
  82. Xstevie: $(OBJ) Makefile
  83. X    BLINK TO stevie FROM lib:cres.o $(OBJ) LIBRARY $(LIBS) $(LINKFLAGS)
  84. X
  85. Xclean:
  86. X    delete $(OBJ1)
  87. X    delete $(OBJ2)
  88. X    delete $(OBJ3)
  89. X    delete $(OBJ4)
  90. X    delete $(MACH)
  91. X    delete stevie
  92. SHAR_EOF
  93. echo "extracting README"
  94. sed 's/^X//' << \SHAR_EOF > README
  95. XSTEVIE Source Release
  96. X
  97. XThis is a source release of the STEVIE editor, a public domain clone
  98. Xof the UNIX editor 'vi'. The program was originally developed for the
  99. XAtari ST, but has been ported to UNIX, OS/2, BSD 4.3 and the Amiga as well.
  100. X
  101. XThere are currently two divergent versions of STEVIE. This version is the one
  102. Xthat was ported to the Amiga and then worked on by me (G. R. Walter). The other
  103. Xone Tony Andrews continued to work on. My version is faster in some respects
  104. Xthen his version, and his version does a couple of things mine doesn't. 
  105. X
  106. XThe files included in this release are:
  107. X
  108. XREADME
  109. X    This file.
  110. X
  111. Xstevie.doc
  112. X    Reference manual for STEVIE. Assumes familiarity with vi.
  113. X
  114. Xsource.doc
  115. X    Quick overview of the major data structures used.
  116. X
  117. Xporting.doc
  118. X    Tips for porting STEVIE to other systems.
  119. X
  120. Xmakefile.dos
  121. Xmakefile.os2
  122. Xmakefile.usg
  123. Xmakefile.tos
  124. Xmakefile.bsd
  125. Xmakefile.amiga.lattice
  126. X    Makefiles for MS DOS, OS/2, UNIX System V, Atari ST, BSD 4.3 UNIX and
  127. Xthe Amiga respectively.
  128. X
  129. Xamiga.c
  130. Xamiga.h
  131. Xbsd.c
  132. Xbsd.h
  133. Xdos.c
  134. Xdos.h
  135. Xos2.c
  136. Xos2.h
  137. Xunix.c
  138. Xunix.h
  139. Xtos.c
  140. Xtos.h
  141. X    System-dependent routines for the same.
  142. X
  143. Xalloc.c ascii.h cmdline.c edit.c fileio.c help.c charset.c
  144. Xkeymap.h linefunc.c main.c mark.c misccmds.c normal.c param.c
  145. Xregexp.c regsub.c version.c regexp.h regmagic.h
  146. Xparam.h ptrfunc.c screen.c search.c stevie.h term.h macros.h
  147. X
  148. X    C source and header files for STEVIE.
  149. X
  150. XTo compile STEVIE for one of the provided systems:
  151. X
  152. X    1. Compile the regular expression library and install as
  153. X       appropriate for your system.
  154. X
  155. X    2. Edit the file 'env.h' to set the system defines as needed.
  156. X
  157. X    3. Check the makefile for your system, and modify as needed.
  158. X
  159. X    4. Compile.
  160. X
  161. XNOTE: implicit in the design is the assumption that char's are unsigned. Thus
  162. X      if your compiler assumes different by default, change the default or
  163. X      you may have to change the source.
  164. X
  165. XTony Andrews            March  12, 1988
  166. XG. R. (Fred) Walter     August 14, 1988
  167. SHAR_EOF
  168. echo "extracting TODO"
  169. sed 's/^X//' << \SHAR_EOF > TODO
  170. XTo Do
  171. X-----
  172. X
  173. X- Change the static buffers for insert/undo/redo/undoundo/etc to dynamic
  174. X  buffers.
  175. X
  176. X- Add #'d and named buffers.
  177. X
  178. X- Add 'R' and 'U'.
  179. X
  180. X- In cmdline.c make get_range() give the appropriate error messages when it
  181. X  gets a bad line range.
  182. X
  183. X- Add & (do last search and replace on current line) and :[range]&
  184. X  (do last search and replace on the range of lines).
  185. X
  186. X- add set wrapmargin command
  187. X- add set shiftwidth command
  188. X- add set autowrite command
  189. X
  190. X- add checks for out of memory when strsave() is used
  191. SHAR_EOF
  192. echo "extracting alloc.c"
  193. sed 's/^X//' << \SHAR_EOF > alloc.c
  194. X/*
  195. X * STEVIE - Simply Try this Editor for VI Enthusiasts
  196. X *
  197. X * Code Contributions By : Tim Thompson           twitch!tjt
  198. X *                         Tony Andrews           onecom!wldrdg!tony 
  199. X *                         G. R. (Fred) Walter    watmath!watcgl!grwalter 
  200. X */
  201. X
  202. X#ifdef AMIGA
  203. X# include <proto/exec.h>
  204. X# include <exec/memory.h>
  205. X# define PANIC_FACTOR_CHIP 40000
  206. X#endif
  207. X#include "stevie.h"
  208. X
  209. X/*
  210. X * This file contains various routines dealing with allocation and
  211. X * deallocation of data structures. 
  212. X */
  213. X
  214. Xchar           *
  215. Xalloc(size)
  216. X    unsigned        size;
  217. X{
  218. X    char           *p;        /* pointer to new storage space */
  219. X
  220. X    p = malloc(size);
  221. X    if (p == (char *) NULL) {    /* if there is no more room... */
  222. X    emsg("alloc() is unable to find memory!");
  223. X    sleep(5);
  224. X    }
  225. X#ifdef AMIGA
  226. X    if (AvailMem(MEMF_CHIP) < PANIC_FACTOR_CHIP) {
  227. X    free(p);
  228. X    p = (char *) NULL;
  229. X    emsg("alloc() - not enough CHIP memory!");
  230. X    sleep(5);
  231. X    }
  232. X#endif
  233. X
  234. X    return (p);
  235. X}
  236. X
  237. Xchar           *
  238. Xstrsave(string)
  239. X    char           *string;
  240. X{
  241. X    char           *s;
  242. X
  243. X    s = alloc((unsigned) (strlen(string) + 1));
  244. X    if (s != (char *) NULL)
  245. X    strcpy(s, string);
  246. X    return (s);
  247. X}
  248. X
  249. Xvoid
  250. Xscreenalloc()
  251. X{
  252. X    int             i;
  253. X
  254. X    /*
  255. X     * If we're changing the size of the screen, free the old arrays 
  256. X     */
  257. X    if (LinePointers != (LINE **) NULL)
  258. X    free((char *) LinePointers);
  259. X    if (LineSizes != (char *) NULL)
  260. X    free(LineSizes);
  261. X
  262. X    LinePointers = (LINE **) malloc((unsigned) (Rows * sizeof(LINE *)));
  263. X    LineSizes = malloc((unsigned) Rows);
  264. X    if (LinePointers == (LINE **) NULL || LineSizes == (char *) NULL) {
  265. X    fprintf(stderr, "Unable to allocate screen memory!\n");
  266. X    getout(1);
  267. X    }
  268. X    for (i = 0; i < Rows; i++) {
  269. X    LinePointers[i] = (LINE *) NULL;
  270. X    LineSizes[i] = (char) 0;
  271. X    }
  272. X    NumLineSizes = -1;
  273. X}
  274. X
  275. X/*
  276. X * Allocate and initialize a new line structure with room for 'nchars'
  277. X * characters. 
  278. X */
  279. XLINE           *
  280. Xnewline(nchars)
  281. X    int             nchars;
  282. X{
  283. X    register LINE  *l;
  284. X
  285. X    if (nchars == 0)
  286. X    nchars = 1;
  287. X
  288. X    l = (LINE *) alloc((unsigned) sizeof(LINE));
  289. X    if (l != (LINE *) NULL) {
  290. X    l->s = alloc((unsigned) nchars);    /* the line is empty */
  291. X    if (l->s != (char *) NULL) {
  292. X        l->s[0] = NUL;
  293. X        l->size = nchars;
  294. X
  295. X        l->prev = (LINE *) NULL;    /* should be initialized by caller */
  296. X        l->next = (LINE *) NULL;
  297. X    } else {
  298. X        free((char *) l);
  299. X        l = (LINE *) NULL;
  300. X    }
  301. X    }
  302. X    return l;
  303. X}
  304. X
  305. X/*
  306. X * filealloc() - construct an initial empty file buffer 
  307. X */
  308. Xvoid
  309. Xfilealloc()
  310. X{
  311. X    Filemem->linep = newline(1);
  312. X    Filetop->linep = newline(1);
  313. X    Fileend->linep = newline(1);
  314. X    if (Filemem->linep == (LINE *) NULL ||
  315. X    Filetop->linep == (LINE *) NULL ||
  316. X    Fileend->linep == (LINE *) NULL) {
  317. X    fprintf(stderr, "Unable to allocate file memory!\n");
  318. X    getout(1);
  319. X    }
  320. X    Filemem->index = 0;
  321. X    Filetop->index = 0;
  322. X    Fileend->index = 0;
  323. X
  324. X    Filetop->linep->prev = (LINE *) NULL;
  325. X    Filetop->linep->next = Filemem->linep;    /* connect Filetop to Filemem */
  326. X    Filemem->linep->prev = Filetop->linep;
  327. X
  328. X    Filemem->linep->next = Fileend->linep;    /* connect Filemem to Fileend */
  329. X    Fileend->linep->prev = Filemem->linep;
  330. X    Fileend->linep->next = (LINE *) NULL;
  331. X
  332. X    *Curschar = *Filemem;
  333. X    *Topchar = *Filemem;
  334. X
  335. X    Filemem->linep->num = 0;
  336. X    Fileend->linep->num = 0xffffffffL;
  337. X
  338. X    clrall();            /* clear all marks */
  339. X}
  340. X
  341. X/*
  342. X * freeall() - free the current buffer 
  343. X *
  344. X * Free all lines in the current buffer. 
  345. X */
  346. Xvoid
  347. Xfreeall()
  348. X{
  349. X    LINE           *lp;
  350. X    LINE           *xlp;
  351. X    int             i;
  352. X
  353. X    for (lp = Filetop->linep; lp != (LINE *) NULL; lp = xlp) {
  354. X    if (lp->s != (char *) NULL)
  355. X        free(lp->s);
  356. X    xlp = lp->next;
  357. X    free((char *) lp);
  358. X    }
  359. X
  360. X    Curschar->linep = (LINE *) NULL;    /* clear pointers */
  361. X    Filemem->linep = (LINE *) NULL;
  362. X    Filetop->linep = (LINE *) NULL;
  363. X    Fileend->linep = (LINE *) NULL;
  364. X
  365. X    for (i = 0; i < Rows; i++) {/* clear screen information */
  366. X    LinePointers[i] = (LINE *) NULL;
  367. X    LineSizes[i] = (char) 0;
  368. X    }
  369. X    NumLineSizes = -1;
  370. X}
  371. X
  372. X/*
  373. X * canincrease(n) - returns TRUE if the current line can be increased 'n'
  374. X * bytes 
  375. X *
  376. X * This routine returns immediately if the requested space is available. If not,
  377. X * it attempts to allocate the space and adjust the data structures
  378. X * accordingly. If everything fails it returns FALSE. 
  379. X */
  380. Xbool_t
  381. Xcanincrease(n)
  382. X    register int    n;
  383. X{
  384. X    register int    nsize;
  385. X    register char  *s;        /* pointer to new space */
  386. X
  387. X    nsize = strlen(Curschar->linep->s) + 1 + n;    /* size required */
  388. X
  389. X    if (nsize <= Curschar->linep->size)
  390. X    return TRUE;
  391. X
  392. X    /*
  393. X     * Need to allocate more space for the string. Allow some extra space on
  394. X     * the assumption that we may need it soon. This avoids excessive numbers
  395. X     * of calls to malloc while entering new text. 
  396. X     */
  397. X    s = alloc((unsigned) (nsize + SLOP));
  398. X    if (s == (char *) NULL) {
  399. X    emsg("Can't add anything, file is too big!");
  400. X    State = NORMAL;
  401. X    return FALSE;
  402. X    }
  403. X    Curschar->linep->size = nsize + SLOP;
  404. X    strcpy(s, Curschar->linep->s);
  405. X    free(Curschar->linep->s);
  406. X    Curschar->linep->s = s;
  407. X
  408. X    return TRUE;
  409. X}
  410. SHAR_EOF
  411. echo "extracting amiga.c"
  412. sed 's/^X//' << \SHAR_EOF > amiga.c
  413. X/*
  414. X * Amiga system-dependent routines. 
  415. X */
  416. X
  417. X#include <proto/exec.h>
  418. X#include <proto/dos.h>
  419. X#include <exec/memory.h>
  420. X#include <devices/conunit.h>
  421. X#include <stdio.h>
  422. X#include <ios1.h>
  423. X#include <error.h>
  424. X
  425. X#include "stevie.h"
  426. X
  427. X/* Globals initialized by get_ConUnit() */
  428. Xstruct Window  *conWindow;
  429. Xstruct ConUnit *conUnit;
  430. X
  431. Xextern int      errno;        /* The error variable */
  432. X
  433. Xlong            raw_in = 0;
  434. Xlong            raw_out = 0;
  435. X
  436. X#define BSIZE   2048
  437. Xstatic char     outbuf[BSIZE];
  438. Xstatic int      bpos = 0;
  439. X
  440. Xvoid
  441. Xflushbuf()
  442. X{
  443. X    if (bpos != 0)
  444. X    Write(raw_out, outbuf, bpos);
  445. X    bpos = 0;
  446. X}
  447. X
  448. Xvoid
  449. Xoutchar(c)
  450. X    char            c;
  451. X{
  452. X    outbuf[bpos++] = c;
  453. X    if (bpos >= BSIZE)
  454. X    flushbuf();
  455. X}
  456. X
  457. Xvoid
  458. Xoutstr(s)
  459. X    char           *s;
  460. X{
  461. X    while (*s) {
  462. X    outbuf[bpos++] = *s++;
  463. X    if (bpos >= BSIZE)
  464. X        flushbuf();
  465. X    }
  466. X}
  467. X
  468. Xint
  469. XGetCharacter()
  470. X{
  471. X    char            c;
  472. X
  473. X    Read(raw_in, &c, sizeof(c));
  474. X    return ((int) c);
  475. X}
  476. X
  477. X/*
  478. X * getCSIsequence - get a CSI sequence
  479. X *                - either cursor keys, help, or function keys
  480. X */
  481. X
  482. Xint
  483. XgetCSIsequence()
  484. X{
  485. X    int             c;
  486. X    int             tmp;
  487. X
  488. X
  489. X    c = GetCharacter();
  490. X    if (isdigit(c)) {
  491. X    tmp = 0;
  492. X    while (isdigit(c)) {
  493. X        tmp = tmp * 10 + c - '0';
  494. X        c = GetCharacter();
  495. X    }
  496. X    if (c == '~')        /* function key */
  497. X        return ((char) (K_F1 + tmp));
  498. X    }
  499. X    switch (c) {
  500. X      case 'A':        /* cursor up */
  501. X    return K_UARROW;
  502. X      case 'B':        /* cursor down */
  503. X    return K_DARROW;
  504. X      case 'C':        /* cursor right */
  505. X    return K_RARROW;
  506. X      case 'D':        /* cursor left */
  507. X    return K_LARROW;
  508. X      case 'T':        /* shift cursor up */
  509. X    return K_SUARROW;
  510. X      case 'S':        /* shift cursor down */
  511. X    return K_SDARROW;
  512. X      case ' ':        /* shift cursor left or right */
  513. X    c = GetCharacter();
  514. X    if (c == 'A')        /* shift cursor left */
  515. X        return K_SLARROW;
  516. X    if (c == '@')        /* shift cursor right */
  517. X        return K_SRARROW;
  518. X    break;
  519. X      case '?':        /* help */
  520. X    c = GetCharacter();
  521. X    if (c == '~')
  522. X        return K_HELP;
  523. X    break;
  524. X    }
  525. X    while ((c != '|') && (c != '~')) {
  526. X    if (WaitForChar(raw_in, 500L) == 0)
  527. X        break;
  528. X    c = GetCharacter();
  529. X    }
  530. X
  531. X    /* must have been screen resize event */
  532. X    s_clear();
  533. X    flushbuf();
  534. X    if (get_ConUnit(raw_in) != 0) {    /* hopefully never exit .... */
  535. X    emsg("STEVIE: can't get ConUnit info ?!?!?!?\n");
  536. X    sleep(5);
  537. X    return 0;
  538. X    }
  539. X    Rows = conUnit->cu_YMax + 1;
  540. X    Columns = conUnit->cu_XMax + 1;
  541. X    if (Columns < 5)
  542. X    Columns = 5;
  543. X    if (Columns > MAX_COLUMNS)
  544. X    Columns = MAX_COLUMNS;
  545. X    if (Rows < 2)
  546. X    Rows = 2;
  547. X    P(P_LI) = Rows;
  548. X
  549. X    screenalloc();
  550. X    tmp = RedrawingDisabled;
  551. X    RedrawingDisabled = TRUE;
  552. X    S_NOT_VALID;
  553. X    cursupdate(UPDATE_ALL);    /* make sure not below Botchar */
  554. X    RedrawingDisabled = FALSE;
  555. X    s_refresh(NOT_VALID);    /* draw it */
  556. X    RedrawingDisabled = tmp;
  557. X    windgoto(Cursrow, Curscol);
  558. X    flushbuf();
  559. X
  560. X    return 0;
  561. X}
  562. X
  563. X/*
  564. X * inchar() - get a character from the keyboard 
  565. X */
  566. Xint
  567. Xinchar()
  568. X{
  569. X    int             c;
  570. X
  571. X    flushbuf();
  572. X
  573. X    for (;;) {
  574. X    c = GetCharacter();
  575. X    if (c == 0x9b)
  576. X        c = getCSIsequence();
  577. X    if (c != 0)
  578. X        break;
  579. X    }
  580. X
  581. X    return c;
  582. X}
  583. X
  584. Xvoid
  585. Xbeep()
  586. X{
  587. X    if (RedrawingDisabled)
  588. X    return;
  589. X
  590. X    outbuf[bpos++] = '\007';
  591. X    if (bpos >= BSIZE)
  592. X    flushbuf();
  593. X}
  594. X
  595. Xvoid
  596. Xsleep(n)
  597. X    int             n;
  598. X{
  599. X    void            Delay();
  600. X
  601. X    if (n > 0)
  602. X    Delay(50L * n);
  603. X}
  604. X
  605. Xvoid
  606. Xdelay()
  607. X{
  608. X    void            Delay();
  609. X
  610. X    Delay(25L);
  611. X}
  612. X
  613. Xvoid
  614. Xwindinit()
  615. X{
  616. X    raw_in = Input();
  617. X    if (!IsInteractive(raw_in)) {
  618. X    raw_in = Open("RAW:0/0/480/200/STEVIE", MODE_NEWFILE);
  619. X    if (raw_in == NULL) {
  620. X        fprintf(stderr, "STEVIE: Can't open window ?!?!?!?\n");
  621. X        exit(2);
  622. X    }
  623. X    raw_out = raw_in;
  624. X    } else {
  625. X    raw_out = Output();
  626. X    if (raw(raw_in) != 0) {
  627. X        perror("STEVIE: Can't change to raw mode ?!?!?!?");
  628. X        exit(2);
  629. X    }
  630. X    }
  631. X
  632. X    if (get_ConUnit(raw_in) != 0) {
  633. X    fprintf(stderr, "STEVIE: can't get ConUnit info ?!?!?!?\n");
  634. X    windexit(3);
  635. X    }
  636. X    /* get window size */
  637. X    P(P_LI) = Rows = conUnit->cu_YMax + 1;
  638. X    Columns = conUnit->cu_XMax + 1;
  639. X
  640. X    outstr("\033[12{");        /* window resize events activated */
  641. X    flushbuf();
  642. X}
  643. X
  644. Xvoid
  645. Xwindexit(r)
  646. X    int             r;
  647. X{
  648. X    outstr("\033[12}");        /* window resize events de-activated */
  649. X    flushbuf();
  650. X
  651. X    if (raw_in != raw_out) {
  652. X    if (cooked(raw_in) != 0)
  653. X        perror("STEVIE: Can't change to cooked mode ?!?!?!?");
  654. X    } else {
  655. X    Close(raw_in);
  656. X    }
  657. X
  658. X    exit(r);
  659. X}
  660. X
  661. Xvoid
  662. Xwindgoto(r, c)
  663. X    int             c;
  664. X    int             r;
  665. X{
  666. X    r++;
  667. X    c++;
  668. X
  669. X    outstr("\033[");
  670. X    if (r >= 10)
  671. X    outchar((char) (r / 10 + '0'));
  672. X    outchar((char) (r % 10 + '0'));
  673. X    outchar(';');
  674. X    if (c >= 10)
  675. X    outchar((char) (c / 10 + '0'));
  676. X    outchar((char) (c % 10 + '0'));
  677. X    outchar('H');
  678. X}
  679. X
  680. XFILE           *
  681. Xfopenb(fname, mode)
  682. X    char           *fname;
  683. X    char           *mode;
  684. X{
  685. X    FILE           *fopen();
  686. X    char            modestr[16];
  687. X
  688. X    sprintf(modestr, "%sb", mode);
  689. X    return fopen(fname, modestr);
  690. X}
  691. X
  692. X/*
  693. X * raw() & cooked()
  694. X *
  695. X * These are routines for setting a given stream to raw or cooked mode on the
  696. X * Amiga. This is useful when you are using Lattice C to produce programs
  697. X * that want to read single characters with the "getch()" or "fgetc" call. 
  698. X *
  699. X * Written : 18-Jun-87 By Chuck McManis.
  700. X */
  701. X
  702. X/*
  703. X * Function raw() - Convert the specified File Handle to 'raw' mode. This
  704. X * only works on TTY's and essentially keeps DOS from translating keys for
  705. X * you.
  706. X */
  707. X
  708. Xlong
  709. Xraw(afh)
  710. X    struct FileHandle *afh;
  711. X{
  712. X    struct MsgPort *mp;        /* The File Handle message port */
  713. X    long            Arg[1], res;
  714. X
  715. X    mp = ((struct FileHandle *) (BADDR(afh)))->fh_Type;
  716. X    Arg[0] = -1L;
  717. X    res = SendPacket(mp, ACTION_SCREEN_MODE, Arg, 1);
  718. X    if (res == 0) {
  719. X    errno = ENXIO;
  720. X    return (-1);
  721. X    }
  722. X    return (0);
  723. X}
  724. X
  725. X/*
  726. X * Function - cooked() this function returns the designate file pointer to
  727. X * it's normal, wait for a <CR> mode. This is exactly like raw() except that
  728. X * it sends a 0 to the console to make it back into a CON: from a RAW: 
  729. X */
  730. X
  731. Xlong
  732. Xcooked(afh)
  733. X    struct FileHandle *afh;
  734. X{
  735. X    struct MsgPort *mp;        /* The File Handle message port */
  736. X    long            Arg[1], res;
  737. X
  738. X    mp = ((struct FileHandle *) (BADDR(afh)))->fh_Type;
  739. X    Arg[0] = 0L;
  740. X    res = SendPacket(mp, ACTION_SCREEN_MODE, Arg, 1);
  741. X    if (res == 0) {
  742. X    errno = ENXIO;
  743. X    return (-1);
  744. X    }
  745. X    return (0);
  746. X}
  747. X
  748. X/*
  749. X * Code for this routine came from the following :
  750. X *
  751. X * ConPackets.c -  C. Scheppner, A. Finkel, P. Lindsay  CBM
  752. X *   DOS packet example
  753. X *   Requires 1.2
  754. X *
  755. X * which I found on Fish Disk 56.
  756. X */
  757. X
  758. X/* initializes conWindow and conUnit (global vars) */
  759. Xlong
  760. Xget_ConUnit(afh)
  761. X    struct FileHandle *afh;
  762. X{
  763. X    struct MsgPort *mp;        /* The File Handle message port */
  764. X    struct InfoData *id;
  765. X    long            Arg[8], res;
  766. X
  767. X    if (!IsInteractive((BPTR) afh)) {
  768. X    errno = ENOTTY;
  769. X    return (-1);
  770. X    }
  771. X    mp = ((struct FileHandle *) (BADDR(afh)))->fh_Type;
  772. X
  773. X    /* Alloc to insure longword alignment */
  774. X    id = (struct InfoData *) AllocMem(sizeof(struct InfoData),
  775. X                      MEMF_PUBLIC | MEMF_CLEAR);
  776. X    if (!id) {
  777. X    errno = ENOMEM;
  778. X    return (-1);
  779. X    }
  780. X    Arg[0] = ((ULONG) id) >> 2;
  781. X    res = SendPacket(mp, ACTION_DISK_INFO, Arg, 1);
  782. X    conWindow = (struct Window *) id->id_VolumeNode;
  783. X    conUnit = (struct ConUnit *) ((struct IOStdReq *) id->id_InUse)->io_Unit;
  784. X    FreeMem(id, sizeof(struct InfoData));
  785. X    if (res == 0) {
  786. X    errno = ENXIO;
  787. X    return (-1);
  788. X    }
  789. X    return (0);
  790. X}
  791. X
  792. X/*
  793. X * SendPacket() - written by Phil Lindsay, Carolyn Scheppner, and Andy
  794. X * Finkel. This function will send a packet of the given type to the Message
  795. X * Port supplied. 
  796. X */
  797. X
  798. Xlong
  799. XSendPacket(pid, action, args, nargs)
  800. X    struct MsgPort *pid;    /* process indentifier ... (handlers message
  801. X                 * port ) */
  802. X    long            action,    /* packet type ... (what you want handler to
  803. X                 * do )   */
  804. X                    args[],    /* a pointer to a argument list */
  805. X                    nargs;    /* number of arguments in list  */
  806. X{
  807. X    struct MsgPort *replyport;
  808. X    struct StandardPacket *packet;
  809. X
  810. X    long            count, *pargs, res1;
  811. X
  812. X    replyport = (struct MsgPort *) CreatePort(NULL, 0);
  813. X    if (!replyport)
  814. X    return (0);
  815. X
  816. X    /* Allocate space for a packet, make it public and clear it */
  817. X    packet = (struct StandardPacket *)
  818. X    AllocMem((long) sizeof(struct StandardPacket),
  819. X         MEMF_PUBLIC | MEMF_CLEAR);
  820. X    if (!packet) {
  821. X    DeletePort(replyport);
  822. X    return (0);
  823. X    }
  824. X    packet->sp_Msg.mn_Node.ln_Name = (char *) &(packet->sp_Pkt);
  825. X    packet->sp_Pkt.dp_Link = &(packet->sp_Msg);
  826. X    packet->sp_Pkt.dp_Port = replyport;
  827. X    packet->sp_Pkt.dp_Type = action;
  828. X
  829. X    /* copy the args into the packet */
  830. X    pargs = &(packet->sp_Pkt.dp_Arg1);    /* address of first argument */
  831. X    for (count = 0; count < nargs; count++)
  832. X    pargs[count] = args[count];
  833. X
  834. X    PutMsg(pid, packet);    /* send packet */
  835. X
  836. X    WaitPort(replyport);
  837. X    GetMsg(replyport);
  838. X
  839. X    res1 = packet->sp_Pkt.dp_Res1;
  840. X
  841. X    FreeMem(packet, (long) sizeof(struct StandardPacket));
  842. X    DeletePort(replyport);
  843. X
  844. X    return (res1);
  845. X}
  846. SHAR_EOF
  847. echo "extracting amiga.h"
  848. sed 's/^X//' << \SHAR_EOF > amiga.h
  849. X/*
  850. X * Amiga Machine-dependent routines. 
  851. X */
  852. X
  853. Xvoid flushbuf();
  854. X
  855. Xint  inchar();
  856. Xvoid outchar();
  857. Xvoid outstr();
  858. Xvoid beep();
  859. Xvoid windinit();
  860. Xvoid windexit();
  861. Xvoid windgoto();
  862. Xvoid delay();
  863. Xvoid sleep();
  864. SHAR_EOF
  865. echo "extracting ascii.h"
  866. sed 's/^X//' << \SHAR_EOF > ascii.h
  867. X/*
  868. X * STEVIE - Simply Try this Editor for VI Enthusiasts
  869. X *
  870. X * Code Contributions By : Tim Thompson           twitch!tjt
  871. X *                         Tony Andrews           onecom!wldrdg!tony 
  872. X *                         G. R. (Fred) Walter    watmath!watcgl!grwalter 
  873. X */
  874. X
  875. X/*
  876. X * Definitions of various common control characters 
  877. X */
  878. X
  879. X#define    NUL            '\000'
  880. X#define    BS            '\010'
  881. X#define    BS_STR            "\010"
  882. X#define    TAB            '\011'
  883. X#define    NL            '\012'
  884. X#define    NL_STR            "\012"
  885. X#define    CR            '\015'
  886. X#define    ESC            '\033'
  887. X#define    ESC_STR            "\033"
  888. X
  889. X#define    UNDO_SHIFTJ        '\333'
  890. X#define    UNDO_SHIFTJ_STR        "\333"
  891. X
  892. X#define    ENABLE_REDRAWING    '\334'
  893. X#define    ENABLE_REDRAWING_STR    "\334"
  894. X
  895. X#define    CTRL(x)    ((x) & 0x1f)
  896. SHAR_EOF
  897. echo "extracting bsd.c"
  898. sed 's/^X//' << \SHAR_EOF > bsd.c
  899. X/*
  900. X * System-dependent routines for BSD 4.3 UNIX 
  901. X */
  902. X
  903. X#include "stevie.h"
  904. X#include <sgtty.h>
  905. X
  906. X#ifdef OLD_IO
  907. X#define BSIZE   2048
  908. Xstatic char     outbuf[BSIZE];
  909. Xstatic int      bpos = 0;
  910. X
  911. Xvoid
  912. Xflushbuf()
  913. X{
  914. X    if (bpos != 0)
  915. X    fwrite(outbuf, sizeof(*outbuf), bpos, stdout);
  916. X    fflush(stdout);
  917. X    bpos = 0;
  918. X}
  919. X
  920. Xvoid
  921. Xoutchar(c)
  922. X    char            c;
  923. X{
  924. X    outbuf[bpos++] = c;
  925. X    if (bpos >= BSIZE)
  926. X    flushbuf();
  927. X}
  928. X
  929. Xvoid
  930. Xoutstr(s)
  931. X    char           *s;
  932. X{
  933. X    while (*s) {
  934. X    outbuf[bpos++] = *s++;
  935. X    if (bpos >= BSIZE)
  936. X        flushbuf();
  937. X    }
  938. X}
  939. X#endif
  940. X
  941. X/*
  942. X * inchar() - get a character from the keyboard 
  943. X */
  944. Xint
  945. Xinchar()
  946. X{
  947. X    int             c;
  948. X
  949. X    flushbuf();            /* flush any pending output */
  950. X
  951. X    c = getchar();
  952. X
  953. X    return c;
  954. X}
  955. X
  956. Xvoid
  957. Xbeep()
  958. X{
  959. X    if (RedrawingDisabled)
  960. X    return;
  961. X
  962. X    outchar('\007');
  963. X}
  964. X
  965. Xvoid
  966. Xdelay()
  967. X{
  968. X    sleep(1);
  969. X}
  970. X
  971. Xstatic struct sgttyb ostate;
  972. X
  973. Xvoid
  974. Xwindinit()
  975. X{
  976. X    char           *getenv();
  977. X    struct sgttyb   nstate;
  978. X#ifdef CHECK_TERM
  979. X    char           *term;
  980. X
  981. X    term = getenv("TERM");
  982. X    if (!term) {
  983. X    fprintf(stderr, "Invalid terminal type '%s'\n", term);
  984. X    exit(1);
  985. X    }
  986. X    if ((strncmp(term, "vt", 2) != 0) && (strncmp(term, "kd", 2) != 0)) {
  987. X    fprintf(stderr, "Invalid terminal type '%s'\n", term);
  988. X    exit(1);
  989. X    }
  990. X#endif
  991. X
  992. X    Columns = 80;
  993. X    P(P_LI) = Rows = 24;
  994. X
  995. X    /*
  996. X     * Go into cbreak mode 
  997. X     */
  998. X    ioctl(1, (long) TIOCGETP, (char *) &ostate);
  999. X    nstate = ostate;
  1000. X    nstate.sg_flags = nstate.sg_flags & ~(ECHO | CRMOD) | CBREAK;
  1001. X    ioctl(1, (long) TIOCSETP, (char *) &nstate);
  1002. X}
  1003. X
  1004. Xvoid
  1005. Xwindexit(r)
  1006. X    int             r;
  1007. X{
  1008. X    flushbuf();
  1009. X
  1010. X    ioctl(0, (long) TIOCSETP, (char *) &ostate);
  1011. X
  1012. X    exit(r);
  1013. X}
  1014. X
  1015. Xvoid
  1016. Xwindgoto(r, c)
  1017. X    int             c;
  1018. X    int             r;
  1019. X{
  1020. X    r++;
  1021. X    c++;
  1022. X
  1023. X    outstr("\033[");
  1024. X    if (r >= 10)
  1025. X    outchar((char) (r / 10 + '0'));
  1026. X    outchar((char) (r % 10 + '0'));
  1027. X    outchar(';');
  1028. X    if (c >= 10)
  1029. X    outchar((char) (c / 10 + '0'));
  1030. X    outchar((char) (c % 10 + '0'));
  1031. X    outchar('H');
  1032. X}
  1033. X
  1034. XFILE           *
  1035. Xfopenb(fname, mode)
  1036. X    char           *fname;
  1037. X    char           *mode;
  1038. X{
  1039. X    return fopen(fname, mode);
  1040. X}
  1041. SHAR_EOF
  1042. echo "extracting bsd.h"
  1043. sed 's/^X//' << \SHAR_EOF > bsd.h
  1044. X/*
  1045. X * BSD 4.3 Machine-dependent routines. 
  1046. X */
  1047. X
  1048. Xint  inchar();
  1049. X
  1050. X#ifdef OLD_IO
  1051. Xvoid flushbuf();
  1052. Xvoid outchar();
  1053. Xvoid outstr();
  1054. X#else
  1055. X# define flushbuf() fflush(stdout)
  1056. X# define outchar(C) putchar(C)
  1057. X# define outstr(S)  fputs((S), stdout)
  1058. X#endif
  1059. X
  1060. Xvoid beep();
  1061. X#define remove(path) unlink(path)
  1062. Xint rename();
  1063. Xvoid windinit();
  1064. Xvoid windexit();
  1065. Xvoid windgoto();
  1066. Xvoid delay();
  1067. SHAR_EOF
  1068. echo "extracting charset.c"
  1069. sed 's/^X//' << \SHAR_EOF > charset.c
  1070. X/*
  1071. X * STEVIE - Simply Try this Editor for VI Enthusiasts
  1072. X *
  1073. X * Code Contributions By : Tim Thompson           twitch!tjt
  1074. X *                         Tony Andrews           onecom!wldrdg!tony 
  1075. X *                         G. R. (Fred) Walter    watmath!watcgl!grwalter 
  1076. X */
  1077. X
  1078. X#include "stevie.h"
  1079. X
  1080. X/*
  1081. X * This file shows how to display characters on the screen. This is approach
  1082. X * is something of an overkill. It's a remnant from the original code that
  1083. X * isn't worth messing with for now. TABS are special-cased depending on the
  1084. X * value of the "list" parameter. 
  1085. X */
  1086. X
  1087. Xstruct charinfo chars[] = {
  1088. X                /* 0 */ 0, 0,    /* both must be zero */
  1089. X                /* 1 */ 2, "^A",
  1090. X                /* 2 */ 2, "^B",
  1091. X                /* 3 */ 2, "^C",
  1092. X                /* 4 */ 2, "^D",
  1093. X                /* 5 */ 2, "^E",
  1094. X                /* 6 */ 2, "^F",
  1095. X                /* 7 */ 2, "^G",
  1096. X                /* 8 */ 2, "^H",
  1097. X                /* 9 */ 2, "^I",
  1098. X                /* 10 */ 7, "[ERROR]",    /* shouldn't happen */
  1099. X                /* 11 */ 2, "^K",
  1100. X                /* 12 */ 2, "^L",
  1101. X                /* 13 */ 2, "^M",
  1102. X                /* 14 */ 2, "^N",
  1103. X                /* 15 */ 2, "^O",
  1104. X                /* 16 */ 2, "^P",
  1105. X                /* 17 */ 2, "^Q",
  1106. X                /* 18 */ 2, "^R",
  1107. X                /* 19 */ 2, "^S",
  1108. X                /* 20 */ 2, "^T",
  1109. X                /* 21 */ 2, "^U",
  1110. X                /* 22 */ 2, "^V",
  1111. X                /* 23 */ 2, "^W",
  1112. X                /* 24 */ 2, "^X",
  1113. X                /* 25 */ 2, "^Y",
  1114. X                /* 26 */ 2, "^Z",
  1115. X                /* 27 */ 2, "^[",
  1116. X                /* 28 */ 2, "^\\",
  1117. X                /* 29 */ 2, "^]",
  1118. X                /* 30 */ 2, "^^",
  1119. X                /* 31 */ 2, "^_",
  1120. X                /* 32 */ 1, " ",
  1121. X                /* 33 */ 1, "!",
  1122. X                /* 34 */ 1, "\"",
  1123. X                /* 35 */ 1, "#",
  1124. X                /* 36 */ 1, "$",
  1125. X                /* 37 */ 1, "%",
  1126. X                /* 38 */ 1, "&",
  1127. X                /* 39 */ 1, "'",
  1128. X                /* 40 */ 1, "(",
  1129. X                /* 41 */ 1, ")",
  1130. X                /* 42 */ 1, "*",
  1131. X                /* 43 */ 1, "+",
  1132. X                /* 44 */ 1, ",",
  1133. X                /* 45 */ 1, "-",
  1134. X                /* 46 */ 1, ".",
  1135. X                /* 47 */ 1, "/",
  1136. X                /* 48 */ 1, "0",
  1137. X                /* 49 */ 1, "1",
  1138. X                /* 50 */ 1, "2",
  1139. X                /* 51 */ 1, "3",
  1140. X                /* 52 */ 1, "4",
  1141. X                /* 53 */ 1, "5",
  1142. X                /* 54 */ 1, "6",
  1143. X                /* 55 */ 1, "7",
  1144. X                /* 56 */ 1, "8",
  1145. X                /* 57 */ 1, "9",
  1146. X                /* 58 */ 1, ":",
  1147. X                /* 59 */ 1, ";",
  1148. X                /* 60 */ 1, "<",
  1149. X                /* 61 */ 1, "=",
  1150. X                /* 62 */ 1, ">",
  1151. X                /* 63 */ 1, "?",
  1152. X                /* 64 */ 1, "@",
  1153. X                /* 65 */ 1, "A",
  1154. X                /* 66 */ 1, "B",
  1155. X                /* 67 */ 1, "C",
  1156. X                /* 68 */ 1, "D",
  1157. X                /* 69 */ 1, "E",
  1158. X                /* 70 */ 1, "F",
  1159. X                /* 71 */ 1, "G",
  1160. X                /* 72 */ 1, "H",
  1161. X                /* 73 */ 1, "I",
  1162. X                /* 74 */ 1, "J",
  1163. X                /* 75 */ 1, "K",
  1164. X                /* 76 */ 1, "L",
  1165. X                /* 77 */ 1, "M",
  1166. X                /* 78 */ 1, "N",
  1167. X                /* 79 */ 1, "O",
  1168. X                /* 80 */ 1, "P",
  1169. X                /* 81 */ 1, "Q",
  1170. X                /* 82 */ 1, "R",
  1171. X                /* 83 */ 1, "S",
  1172. X                /* 84 */ 1, "T",
  1173. X                /* 85 */ 1, "U",
  1174. X                /* 86 */ 1, "V",
  1175. X                /* 87 */ 1, "W",
  1176. X                /* 88 */ 1, "X",
  1177. X                /* 89 */ 1, "Y",
  1178. X                /* 90 */ 1, "Z",
  1179. X                /* 91 */ 1, "[",
  1180. X                /* 92 */ 1, "\\",
  1181. X                /* 93 */ 1, "]",
  1182. X                /* 94 */ 1, "^",
  1183. X                /* 95 */ 1, "_",
  1184. X                /* 96 */ 1, "`",
  1185. X                /* 97 */ 1, "a",
  1186. X                /* 98 */ 1, "b",
  1187. X                /* 99 */ 1, "c",
  1188. X                /* 100 */ 1, "d",
  1189. X                /* 101 */ 1, "e",
  1190. X                /* 102 */ 1, "f",
  1191. X                /* 103 */ 1, "g",
  1192. X                /* 104 */ 1, "h",
  1193. X                /* 105 */ 1, "i",
  1194. X                /* 106 */ 1, "j",
  1195. X                /* 107 */ 1, "k",
  1196. X                /* 108 */ 1, "l",
  1197. X                /* 109 */ 1, "m",
  1198. X                /* 110 */ 1, "n",
  1199. X                /* 111 */ 1, "o",
  1200. X                /* 112 */ 1, "p",
  1201. X                /* 113 */ 1, "q",
  1202. X                /* 114 */ 1, "r",
  1203. X                /* 115 */ 1, "s",
  1204. X                /* 116 */ 1, "t",
  1205. X                /* 117 */ 1, "u",
  1206. X                /* 118 */ 1, "v",
  1207. X                /* 119 */ 1, "w",
  1208. X                /* 120 */ 1, "x",
  1209. X                /* 121 */ 1, "y",
  1210. X                /* 122 */ 1, "z",
  1211. X                /* 123 */ 1, "{",
  1212. X                /* 124 */ 1, "|",
  1213. X                /* 125 */ 1, "}",
  1214. X                /* 126 */ 1, "~",
  1215. X                /* 127 */ 2, "^?",
  1216. X                /* 128 */ 5, "[128]",
  1217. X                /* 129 */ 5, "[129]",
  1218. X                /* 130 */ 5, "[130]",
  1219. X                /* 131 */ 5, "[131]",
  1220. X                /* 132 */ 5, "[132]",
  1221. X                /* 133 */ 5, "[133]",
  1222. X                /* 134 */ 5, "[134]",
  1223. X                /* 135 */ 5, "[135]",
  1224. X                /* 136 */ 5, "[136]",
  1225. X                /* 137 */ 5, "[137]",
  1226. X                /* 138 */ 5, "[138]",
  1227. X                /* 139 */ 5, "[139]",
  1228. X                /* 140 */ 5, "[140]",
  1229. X                /* 141 */ 5, "[141]",
  1230. X                /* 142 */ 5, "[142]",
  1231. X                /* 143 */ 5, "[143]",
  1232. X                /* 144 */ 5, "[144]",
  1233. X                /* 145 */ 5, "[145]",
  1234. X                /* 146 */ 5, "[146]",
  1235. X                /* 147 */ 5, "[147]",
  1236. X                /* 148 */ 5, "[148]",
  1237. X                /* 149 */ 5, "[149]",
  1238. X                /* 150 */ 5, "[150]",
  1239. X                /* 151 */ 5, "[151]",
  1240. X                /* 152 */ 5, "[152]",
  1241. X                /* 153 */ 5, "[153]",
  1242. X                /* 154 */ 5, "[154]",
  1243. X                /* 155 */ 5, "[155]",
  1244. X                /* 156 */ 5, "[156]",
  1245. X                /* 157 */ 5, "[157]",
  1246. X                /* 158 */ 5, "[158]",
  1247. X                /* 159 */ 5, "[159]",
  1248. X#ifdef AMIGA
  1249. X                /* 160 */ 1, "\240",
  1250. X                /* 161 */ 1, "\241",
  1251. X                /* 162 */ 1, "\242",
  1252. X                /* 163 */ 1, "\243",
  1253. X                /* 164 */ 1, "\244",
  1254. X                /* 165 */ 1, "\245",
  1255. X                /* 166 */ 1, "\246",
  1256. X                /* 167 */ 1, "\247",
  1257. X                /* 168 */ 1, "\250",
  1258. X                /* 169 */ 1, "\251",
  1259. X                /* 170 */ 1, "\252",
  1260. X                /* 171 */ 1, "\253",
  1261. X                /* 172 */ 1, "\254",
  1262. X                /* 173 */ 1, "\255",
  1263. X                /* 174 */ 1, "\256",
  1264. X                /* 175 */ 1, "\257",
  1265. X                /* 176 */ 1, "\260",
  1266. X                /* 177 */ 1, "\261",
  1267. X                /* 178 */ 1, "\262",
  1268. X                /* 179 */ 1, "\263",
  1269. X                /* 180 */ 1, "\264",
  1270. X                /* 181 */ 1, "\265",
  1271. X                /* 182 */ 1, "\266",
  1272. X                /* 183 */ 1, "\267",
  1273. X                /* 184 */ 1, "\270",
  1274. X                /* 185 */ 1, "\271",
  1275. X                /* 186 */ 1, "\272",
  1276. X                /* 187 */ 1, "\273",
  1277. X                /* 188 */ 1, "\274",
  1278. X                /* 189 */ 1, "\275",
  1279. X                /* 190 */ 1, "\276",
  1280. X                /* 191 */ 1, "\277",
  1281. X                /* 192 */ 1, "\300",
  1282. X                /* 193 */ 1, "\301",
  1283. X                /* 194 */ 1, "\302",
  1284. X                /* 195 */ 1, "\303",
  1285. X                /* 196 */ 1, "\304",
  1286. X                /* 197 */ 1, "\305",
  1287. X                /* 198 */ 1, "\306",
  1288. X                /* 199 */ 1, "\307",
  1289. X                /* 200 */ 1, "\310",
  1290. X                /* 201 */ 1, "\311",
  1291. X                /* 202 */ 1, "\312",
  1292. X                /* 203 */ 1, "\313",
  1293. X                /* 204 */ 1, "\314",
  1294. X                /* 205 */ 1, "\315",
  1295. X                /* 206 */ 1, "\316",
  1296. X                /* 207 */ 1, "\317",
  1297. X                /* 208 */ 1, "\320",
  1298. X                /* 209 */ 1, "\321",
  1299. X                /* 210 */ 1, "\322",
  1300. X                /* 211 */ 1, "\323",
  1301. X                /* 212 */ 1, "\324",
  1302. X                /* 213 */ 1, "\325",
  1303. X                /* 214 */ 1, "\326",
  1304. X                /* 215 */ 1, "\327",
  1305. X                /* 216 */ 1, "\330",
  1306. X                /* 217 */ 1, "\331",
  1307. X                /* 218 */ 1, "\332",
  1308. X                /* 219 */ 1, "\333",
  1309. X                /* 220 */ 1, "\334",
  1310. X                /* 221 */ 1, "\335",
  1311. X                /* 222 */ 1, "\336",
  1312. X                /* 223 */ 1, "\337",
  1313. X                /* 224 */ 1, "\340",
  1314. X                /* 225 */ 1, "\341",
  1315. X                /* 226 */ 1, "\342",
  1316. X                /* 227 */ 1, "\343",
  1317. X                /* 228 */ 1, "\344",
  1318. X                /* 229 */ 1, "\345",
  1319. X                /* 230 */ 1, "\346",
  1320. X                /* 231 */ 1, "\347",
  1321. X                /* 232 */ 1, "\350",
  1322. X                /* 233 */ 1, "\351",
  1323. X                /* 234 */ 1, "\352",
  1324. X                /* 235 */ 1, "\353",
  1325. X                /* 236 */ 1, "\354",
  1326. X                /* 237 */ 1, "\355",
  1327. X                /* 238 */ 1, "\356",
  1328. X                /* 239 */ 1, "\357",
  1329. X                /* 240 */ 1, "\360",
  1330. X                /* 241 */ 1, "\361",
  1331. X                /* 242 */ 1, "\362",
  1332. X                /* 243 */ 1, "\363",
  1333. X                /* 244 */ 1, "\364",
  1334. X                /* 245 */ 1, "\365",
  1335. X                /* 246 */ 1, "\366",
  1336. X                /* 247 */ 1, "\367",
  1337. X                /* 248 */ 1, "\370",
  1338. X                /* 249 */ 1, "\371",
  1339. X                /* 250 */ 1, "\372",
  1340. X                /* 251 */ 1, "\373",
  1341. X                /* 252 */ 1, "\374",
  1342. X                /* 253 */ 1, "\375",
  1343. X                /* 254 */ 1, "\376",
  1344. X                /* 255 */ 1, "\377"
  1345. X#else
  1346. X                /* 160 */ 5, "[160]",
  1347. X                /* 161 */ 5, "[161]",
  1348. X                /* 162 */ 5, "[162]",
  1349. X                /* 163 */ 5, "[163]",
  1350. X                /* 164 */ 5, "[164]",
  1351. X                /* 165 */ 5, "[165]",
  1352. X                /* 166 */ 5, "[166]",
  1353. X                /* 167 */ 5, "[167]",
  1354. X                /* 168 */ 5, "[168]",
  1355. X                /* 169 */ 5, "[169]",
  1356. X                /* 170 */ 5, "[170]",
  1357. X                /* 171 */ 5, "[171]",
  1358. X                /* 172 */ 5, "[172]",
  1359. X                /* 173 */ 5, "[173]",
  1360. X                /* 174 */ 5, "[174]",
  1361. X                /* 175 */ 5, "[175]",
  1362. X                /* 176 */ 5, "[176]",
  1363. X                /* 177 */ 5, "[177]",
  1364. X                /* 178 */ 5, "[178]",
  1365. X                /* 179 */ 5, "[179]",
  1366. X                /* 180 */ 5, "[180]",
  1367. X                /* 181 */ 5, "[181]",
  1368. X                /* 182 */ 5, "[182]",
  1369. X                /* 183 */ 5, "[183]",
  1370. X                /* 184 */ 5, "[184]",
  1371. X                /* 185 */ 5, "[185]",
  1372. X                /* 186 */ 5, "[186]",
  1373. X                /* 187 */ 5, "[187]",
  1374. X                /* 188 */ 5, "[188]",
  1375. X                /* 189 */ 5, "[189]",
  1376. X                /* 190 */ 5, "[190]",
  1377. X                /* 191 */ 5, "[191]",
  1378. X                /* 192 */ 5, "[192]",
  1379. X                /* 193 */ 5, "[193]",
  1380. X                /* 194 */ 5, "[194]",
  1381. X                /* 195 */ 5, "[195]",
  1382. X                /* 196 */ 5, "[196]",
  1383. X                /* 197 */ 5, "[197]",
  1384. X                /* 198 */ 5, "[198]",
  1385. X                /* 199 */ 5, "[199]",
  1386. X                /* 200 */ 5, "[200]",
  1387. X                /* 201 */ 5, "[201]",
  1388. X                /* 202 */ 5, "[202]",
  1389. X                /* 203 */ 5, "[203]",
  1390. X                /* 204 */ 5, "[204]",
  1391. X                /* 205 */ 5, "[205]",
  1392. X                /* 206 */ 5, "[206]",
  1393. X                /* 207 */ 5, "[207]",
  1394. X                /* 208 */ 5, "[208]",
  1395. X                /* 209 */ 5, "[209]",
  1396. X                /* 210 */ 5, "[210]",
  1397. X                /* 211 */ 5, "[211]",
  1398. X                /* 212 */ 5, "[212]",
  1399. X                /* 213 */ 5, "[213]",
  1400. X                /* 214 */ 5, "[214]",
  1401. X                /* 215 */ 5, "[215]",
  1402. X                /* 216 */ 5, "[216]",
  1403. X                /* 217 */ 5, "[217]",
  1404. X                /* 218 */ 5, "[218]",
  1405. X                /* 219 */ 5, "[219]",
  1406. X                /* 220 */ 5, "[220]",
  1407. X                /* 221 */ 5, "[221]",
  1408. X                /* 222 */ 5, "[222]",
  1409. X                /* 223 */ 5, "[223]",
  1410. X                /* 224 */ 5, "[224]",
  1411. X                /* 225 */ 5, "[225]",
  1412. X                /* 226 */ 5, "[226]",
  1413. X                /* 227 */ 5, "[227]",
  1414. X                /* 228 */ 5, "[228]",
  1415. X                /* 229 */ 5, "[229]",
  1416. X                /* 230 */ 5, "[230]",
  1417. X                /* 231 */ 5, "[231]",
  1418. X                /* 232 */ 5, "[232]",
  1419. X                /* 233 */ 5, "[233]",
  1420. X                /* 234 */ 5, "[234]",
  1421. X                /* 235 */ 5, "[235]",
  1422. X                /* 236 */ 5, "[236]",
  1423. X                /* 237 */ 5, "[237]",
  1424. X                /* 238 */ 5, "[238]",
  1425. X                /* 239 */ 5, "[239]",
  1426. X                /* 240 */ 5, "[240]",
  1427. X                /* 241 */ 5, "[241]",
  1428. X                /* 242 */ 5, "[242]",
  1429. X                /* 243 */ 5, "[243]",
  1430. X                /* 244 */ 5, "[244]",
  1431. X                /* 245 */ 5, "[245]",
  1432. X                /* 246 */ 5, "[246]",
  1433. X                /* 247 */ 5, "[247]",
  1434. X                /* 248 */ 5, "[248]",
  1435. X                /* 249 */ 5, "[249]",
  1436. X                /* 250 */ 5, "[250]",
  1437. X                /* 251 */ 5, "[251]",
  1438. X                /* 252 */ 5, "[252]",
  1439. X                /* 253 */ 5, "[253]",
  1440. X                /* 254 */ 5, "[254]",
  1441. X                /* 255 */ 5, "[255]"
  1442. X#endif
  1443. X};
  1444. SHAR_EOF
  1445. echo "End of archive 1 (of 6)"
  1446. # if you want to concatenate archives, remove anything after this line
  1447. exit
  1448.